import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useMenuStore = defineStore('menu', () => {
  const menus = ref([
    {
      index: '1',
      text: '首页',
      name: '首页',
      icon: 'location',
      id: '1',
      childs: [
        {
          title: '轮播图管理',
          arr: [
            {
              name: '发布轮播图',
              index: '1-1',
              id: '1-1',
              path: '/banner_add',
            },
            {
              name: '轮播图列表',
              index: '1-2',
              id: '1-2',
              path: '/banner_list',
            },
          ],
        },
        {
            title: '添加搜索图',
            arr: [
              {
                name: '添加图片',
                index: '1-3',
                id: '1-3',
                path: '/navi_add',
              },
              {
                name: '图片列表',
                index: '1-4',
                id: '1-4',
                path: '/navi_list',
              },
            ],
          },
      ],
    },
    {
        index:'2',
        id:'2',
        text:'用户管理',
        name:'用户管理',
        icon:'menu',
        path:'/user_list'
    },
    {
        index:'3',
        id:'3',
        text:'相册管理',
        name:'相册管理',
        icon:'document',
        path:'/photo'
    },
    {
        index:'4',
        id:'4',
        text:'系统管理',
        name:'系统管理',
        icon:'setting',
        path:'/setting'
    },
  ])
  return{
    menus
  }
})
